@echo off
echo Starting Django server with virtual environment...

:: 激活虚拟环境
call venv\Scripts\activate.bat

:: 设置Django设置模块
set DJANGO_SETTINGS_MODULE=webmgr.settings

:: 添加当前目录到Python路径
set PYTHONPATH=%CD%;%PYTHONPATH%

echo Virtual environment activated
echo Django settings: %DJANGO_SETTINGS_MODULE%
echo.
echo Starting Django development server...
echo Server will be available at: http://localhost:8000/
echo Press Ctrl+C to stop the server
echo.

:: 启动Django服务器
python manage.py runserver 0.0.0.0:8000 